package com.awcall.iot.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 验证码表
 * </p>
 *
 * @author wuhui
 * @since 2018-03-22
 */
@TableName("bd_verif_code")
public class VerifCode extends Model<VerifCode> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Integer id;
	private String telephone;
	private String code;
    /**
     * 发送次数
     */
	private Integer count;
    /**
     * 类型(1:修改密码) 
     */
	private Integer type;
	@TableField(value = "created_at", fill = FieldFill.INSERT)
	private Date createdAt;
	@TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
	private Date updatedAt;


	public Integer getId() {
		return id;
	}

	public VerifCode setId(Integer id) {
		this.id = id;
		return this;
	}

	public String getTelephone() {
		return telephone;
	}

	public VerifCode setTelephone(String telephone) {
		this.telephone = telephone;
		return this;
	}

	public String getCode() {
		return code;
	}

	public VerifCode setCode(String code) {
		this.code = code;
		return this;
	}

	public Integer getCount() {
		return count;
	}

	public VerifCode setCount(Integer count) {
		this.count = count;
		return this;
	}

	public Integer getType() {
		return type;
	}

	public VerifCode setType(Integer type) {
		this.type = type;
		return this;
	}

	public Date getCreatedAt() {
		return createdAt;
	}

	public VerifCode setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
		return this;
	}

	public Date getUpdatedAt() {
		return updatedAt;
	}

	public VerifCode setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
		return this;
	}

	public static final String ID = "id";

	public static final String TELEPHONE = "telephone";

	public static final String CODE = "code";

	public static final String COUNT = "count";

	public static final String TYPE = "type";

	public static final String CREATED_AT = "created_at";

	public static final String UPDATED_AT = "updated_at";

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "VerifCode{" +
			", id=" + id +
			", telephone=" + telephone +
			", code=" + code +
			", count=" + count +
			", type=" + type +
			", createdAt=" + createdAt +
			", updatedAt=" + updatedAt +
			"}";
	}
}
